<ul class="pagination">
    <li class="paginate_button previous disabled"><a href="#" data-dt-idx="0" tabindex="0">共 {{ data.total_pages }} 页</a></li>
    {% for key,value in paginator(data.total_pages,data.current,4) %}
        {% set routerParams['page'] = value %}
        <li class="paginate_button{% if key == data.current %} active{% endif %}"><a data-target="#main" href="{{ url(routerParams) }}">{{ key }}</a></li>
    {% endfor %}

</ul>